package com.zsck.zsgy.ui.main.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.zsck.zsgy.R
import com.zsck.zsgy.app.MyApplication
import com.zsck.zsgy.databinding.ItemSurroundApartmentBinding
import com.zsck.zsgy.ui.main.bean.HomeBean
import com.zsck.zsgy.util.Constants
import com.zsck.zsgy.util.GlideUtils

class SurroundingApartmentAdapter :
    BaseQuickAdapter<HomeBean.SurroundingApartmentsBean, BaseDataBindingHolder<ItemSurroundApartmentBinding>>(
        R.layout.item_surround_apartment
    ) {


    override fun convert(
        holder: BaseDataBindingHolder<ItemSurroundApartmentBinding>,
        item: HomeBean.SurroundingApartmentsBean
    ) {
        if(holder.dataBinding!=null){
            holder.dataBinding!!.surroundApartment=item
            GlideUtils.displayWithConner(
                Constants.IMG_HOST + item.projectCoverFile.getFileId() ,holder.dataBinding!!.ivIcon
                , MyApplication.context,13)

        }
    }

}